#ifndef BSPTREEFORMAT_H
#define BSPTREEFORMAT_H
#pragma pack(push,1)


typedef struct _t_coplanar_polygon
{
	TRI< CVector > poly;
	_t_coplanar_polygon* next;

} COPLANAR_POLYGON, *LPCOPLANAR_POLYGON, *PCOPLANAR_POLYGON;



typedef struct _t_bsptree_nodedata
{
	TRI<CVector> poly;
	PCOPLANAR_POLYGON coplanar;

	CPlane	plane;

	_t_bsptree_nodedata* front;
	_t_bsptree_nodedata* back;

	bool bIsLeaf;

} BSPTREE_NODEDATA, *LPBSPTREE_NODEDATA,*PBSPTREE_NODEDATA;

//--------------------------------------------------------------
//	a mesh
//--------------------------------------------------------------
typedef struct
{
	char				name[64];

	PBSPTREE_NODEDATA	head;

} BSPTREEDATA;

#pragma pack(pop)
#endif
